#ifndef APPSETTINGS_H
#define APPSETTINGS_H

#include <QObject>
#include <QSettings>
#include <QDebug>

/*! Default connection URN for the connection-oriented mode. */
#define LLCP_CONNECTIONORIENTED_SERVICENAME "urn:nfc:xsn:nokia.com:nfcchat"
/*! Default connection port for connection-less mode. */
#define LLCP_CONNECTIONLESS_PORT    35
// Used for the QSettings file, for stats and IAP
#define SETTINGS_ORG "Nokia"
#define SETTINGS_APP "NfcChat"

class AppSettings : public QObject
{
    Q_OBJECT
public:
    explicit AppSettings(QObject *parent = 0);
    
signals:
    
public slots:
    void setUseConnectionLess(const bool useConnectionLess);
    bool useConnectionLess();
    void setNfcUri(const QString& nfcUri);
    QString nfcUri();
    void setNfcPort(const int nfcPort);
    int nfcPort();
    void setSendThroughServerSocket(const bool sendThroughServerSocket);
    bool sendThroughServerSocket();
    void setConnectClientSocket(const bool connectClientSocket);
    bool connectClientSocket();
    void setConnectServerSocket(const bool connectServerSocket);
    bool connectServerSocket();

private:
    void saveSettings();
    void loadSettings();

private:
    bool m_useConnectionLess;
    QString m_nfcUri;
    int m_nfcPort;
    bool m_sendThroughServerSocket;
    bool m_connectClientSocket;
    bool m_connectServerSocket;
};

#endif // APPSETTINGS_H
